package com.tboss.template.system.dto;

import com.tboss.global.utils.useful.SecurityUtils;
import com.tboss.template.common.dto.PagingDto;
import com.tboss.template.common.springSecurity.SecurityBuildService;

public class SystemDto extends PagingDto {

	private String sysUsrId;
	private String sysCodeType;
	private String sysCodeTypeStatus;
	private String sysCode;
	private Integer sysChmod;
	private Integer roleWeight;
	
	public String getSysUsrId(){ return (this.sysUsrId != null) ? this.sysUsrId : SecurityUtils.getCurrentUserName(); }
	public void setSysUsrId(String sysUsrId){ this.sysUsrId = sysUsrId;	}
	
	public String getSysCodeType(){ return this.sysCodeType; }
	public void setSysCodeType(String sysCodeType){ this.sysCodeType = sysCodeType;	}
	
	public String getSysCodeTypeStatus(){ return (this.sysCodeTypeStatus != null) ? this.sysCodeTypeStatus : "true"; }
	public void setSysCodeTypeStatus(String sysCodeTypeStatus){ this.sysCodeTypeStatus = sysCodeTypeStatus; }
	
	public String getSysCode(){ return this.sysCode; }
	public void setSysCode(String sysCode){ this.sysCode = sysCode;	}
	
	public Integer getSysChmod(){ return this.sysChmod; }
	public void setSysChmod(Integer sysChmod){ this.sysChmod = sysChmod; }
		
	public Integer getRoleWeight(){ 
		return (this.roleWeight != null) ? this.roleWeight : SecurityBuildService.currUsrDto.getRoleWeight(); 
	}
	public void setRoleWeight(Integer roleWeight){ this.roleWeight = roleWeight; }
	
}
